<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="API docs for the KeyboardAvoider class from the keyboard_avoider library, for the Dart programming language.">
  <title>KeyboardAvoider class - keyboard_avoider library - Dart API</title>
  <!-- required because all the links are pseudo-absolute -->
  <base href="..">

  <link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500,400i,400,300|Source+Sans+Pro:400,300,700" rel="stylesheet">
  <link rel="stylesheet" href="static-assets/github.css">
  <link rel="stylesheet" href="static-assets/styles.css">
  <link rel="icon" href="static-assets/favicon.png">

</head>

<body>

<div id="overlay-under-drawer"></div>

<header id="title">
  <button id="sidenav-left-toggle" type="button">&nbsp;</button>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li><a href="index.html">keyboard_avoider</a></li>
    <li><a href="keyboard_avoider/keyboard_avoider-library.html">keyboard_avoider</a></li>
    <li class="self-crumb">KeyboardAvoider class</li>
  </ol>
  <div class="self-name">KeyboardAvoider</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<main>

  <div class="col-xs-6 col-sm-3 col-md-2 sidebar sidebar-offcanvas-left">
    <h5>keyboard_avoider library</h5>
    <ol>
      <li class="section-title"><a href="keyboard_avoider/keyboard_avoider-library.html#classes">Classes</a></li>
      <li><a href="keyboard_avoider/KeyboardAvoider-class.html">KeyboardAvoider</a></li>
    
    
    
    
    
    
    
    </ol>
  </div>

  <div class="col-xs-12 col-sm-9 col-md-8 main-content">
      <h1>KeyboardAvoider class </h1>

    <section class="desc markdown">
      <p>Wraps the <a href="keyboard_avoider/KeyboardAvoider/child.html">child</a> in a <code>AnimatedContainer</code> that adjusts its bottom <code>padding</code> to accommodate the on-screen keyboard.
Unlike a <code>Scaffold</code>, it only insets by the actual amount obscured by the keyboard.
If <a href="keyboard_avoider/KeyboardAvoider/autoScroll.html">autoScroll</a> is true and the <a href="keyboard_avoider/KeyboardAvoider/child.html">child</a> contains a focused widget such as a <code>TextField</code>,
automatically scrolls so that it is just visible above the keyboard, plus any additional <a href="keyboard_avoider/KeyboardAvoider/focusPadding.html">focusPadding</a>.</p>
    </section>
    

    <section class="summary offset-anchor" id="constructors">
      <h2>Constructors</h2>

      <dl class="constructor-summary-list">
        <dt id="KeyboardAvoider" class="callable">
          <span class="name"><a href="keyboard_avoider/KeyboardAvoider/KeyboardAvoider.html">KeyboardAvoider</a></span><span class="signature">({<span class="parameter" id="-param-key"><span class="type-annotation">Key</span> <span class="parameter-name">key</span>, </span> <span class="parameter" id="-param-child"><span>@required</span> <span class="type-annotation">Widget</span> <span class="parameter-name">child</span>, </span> <span class="parameter" id="-param-duration"><span class="type-annotation">Duration</span> <span class="parameter-name">duration</span>: <span class="default-value">const Duration(milliseconds: 100)</span>, </span> <span class="parameter" id="-param-curve"><span class="type-annotation">Curve</span> <span class="parameter-name">curve</span>: <span class="default-value">Curves.easeOut</span>, </span> <span class="parameter" id="-param-autoScroll"><span class="type-annotation">bool</span> <span class="parameter-name">autoScroll</span>: <span class="default-value">false</span>, </span> <span class="parameter" id="-param-focusPadding"><span class="type-annotation">double</span> <span class="parameter-name">focusPadding</span>: <span class="default-value">12.0</span></span> })</span>
        </dt>
        <dd>
          
        </dd>
      </dl>
    </section>

    <section class="summary offset-anchor" id="instance-properties">
      <h2>Properties</h2>

      <dl class="properties">
        <dt id="autoScroll" class="property">
          <span class="name"><a href="keyboard_avoider/KeyboardAvoider/autoScroll.html">autoScroll</a></span>
          <span class="signature">&#8594; bool</span> 
        </dt>
        <dd>
          Whether to auto-scroll to the focused widget after the keyboard appears. Defaults to false.
Could be expensive because it searches all the child objects in this widget's render tree.
          <div class="features">final</div>
</dd>
        <dt id="child" class="property">
          <span class="name"><a href="keyboard_avoider/KeyboardAvoider/child.html">child</a></span>
          <span class="signature">&#8594; Widget</span> 
        </dt>
        <dd>
          The child to embed. If the <a href="keyboard_avoider/KeyboardAvoider/child.html">child</a> is not a <code>ScrollView</code>, it is automatically embedded in a <code>SingleChildScrollView</code>.
If the <a href="keyboard_avoider/KeyboardAvoider/child.html">child</a> is a <code>ScrollView</code>, it must have a <code>ScrollController</code>.
          <div class="features">final</div>
</dd>
        <dt id="curve" class="property">
          <span class="name"><a href="keyboard_avoider/KeyboardAvoider/curve.html">curve</a></span>
          <span class="signature">&#8594; Curve</span> 
        </dt>
        <dd>
          Animation curve. Defaults to <code>easeOut</code>
          <div class="features">final</div>
</dd>
        <dt id="duration" class="property">
          <span class="name"><a href="keyboard_avoider/KeyboardAvoider/duration.html">duration</a></span>
          <span class="signature">&#8594; Duration</span> 
        </dt>
        <dd>
          Duration of the resize animation. Defaults to 100ms. To disable, set to <code>Duration.zero</code>.
          <div class="features">final</div>
</dd>
        <dt id="focusPadding" class="property">
          <span class="name"><a href="keyboard_avoider/KeyboardAvoider/focusPadding.html">focusPadding</a></span>
          <span class="signature">&#8594; double</span> 
        </dt>
        <dd>
          Space to put between the focused widget and the top of the keyboard. Defaults to 12.
Useful in case the focused widget is inside a parent widget that you also want to be visible.
          <div class="features">final</div>
</dd>
        <dt id="hashCode" class="property inherited">
          <span class="name"><a href="keyboard_avoider/KeyboardAvoider/hashCode.html">hashCode</a></span>
          <span class="signature">&#8594; int</span> 
        </dt>
        <dd class="inherited">
          The hash code for this object. <a href="keyboard_avoider/KeyboardAvoider/hashCode.html">[...]</a>
          <div class="features">read-only, inherited</div>
</dd>
        <dt id="key" class="property inherited">
          <span class="name"><a href="keyboard_avoider/KeyboardAvoider/key.html">key</a></span>
          <span class="signature">&#8594; Key</span> 
        </dt>
        <dd class="inherited">
          Controls how one widget replaces another widget in the tree. <a href="keyboard_avoider/KeyboardAvoider/key.html">[...]</a>
          <div class="features">final, inherited</div>
</dd>
        <dt id="runtimeType" class="property inherited">
          <span class="name"><a href="keyboard_avoider/KeyboardAvoider/runtimeType.html">runtimeType</a></span>
          <span class="signature">&#8594; Type</span> 
        </dt>
        <dd class="inherited">
          A representation of the runtime type of the object.
          <div class="features">read-only, inherited</div>
</dd>
      </dl>
    </section>

    <section class="summary offset-anchor" id="instance-methods">
      <h2>Methods</h2>
      <dl class="callables">
        <dt id="createState" class="callable">
          <span class="name"><a href="keyboard_avoider/KeyboardAvoider/createState.html">createState</a></span><span class="signature">(<wbr>)
            <span class="returntype parameter">&#8594; _KeyboardAvoiderState</span>
          </span>
          </dt>
        <dd>
          Creates the mutable state for this widget at a given location in the tree. <a href="keyboard_avoider/KeyboardAvoider/createState.html">[...]</a>
          
</dd>
        <dt id="createElement" class="callable inherited">
          <span class="name"><a href="keyboard_avoider/KeyboardAvoider/createElement.html">createElement</a></span><span class="signature">(<wbr>)
            <span class="returntype parameter">&#8594; StatefulElement</span>
          </span>
          </dt>
        <dd class="inherited">
          Creates a <code>StatefulElement</code> to manage this widget's location in the tree. <a href="keyboard_avoider/KeyboardAvoider/createElement.html">[...]</a>
          <div class="features">inherited</div>
</dd>
        <dt id="debugDescribeChildren" class="callable inherited">
          <span class="name"><a href="keyboard_avoider/KeyboardAvoider/debugDescribeChildren.html">debugDescribeChildren</a></span><span class="signature">(<wbr>)
            <span class="returntype parameter">&#8594; List<span class="signature">&lt;<wbr><span class="type-parameter">DiagnosticsNode</span>&gt;</span></span>
          </span>
          </dt>
        <dd class="inherited">
          Returns a list of <code>DiagnosticsNode</code> objects describing this node's
children. <a href="keyboard_avoider/KeyboardAvoider/debugDescribeChildren.html">[...]</a>
          <div class="features">@protected, inherited</div>
</dd>
        <dt id="debugFillProperties" class="callable inherited">
          <span class="name"><a href="keyboard_avoider/KeyboardAvoider/debugFillProperties.html">debugFillProperties</a></span><span class="signature">(<wbr><span class="parameter" id="debugFillProperties-param-properties"><span class="type-annotation">DiagnosticPropertiesBuilder</span> <span class="parameter-name">properties</span></span>)
            <span class="returntype parameter">&#8594; void</span>
          </span>
          </dt>
        <dd class="inherited">
          Add additional properties associated with the node. <a href="keyboard_avoider/KeyboardAvoider/debugFillProperties.html">[...]</a>
          <div class="features">inherited</div>
</dd>
        <dt id="noSuchMethod" class="callable inherited">
          <span class="name"><a href="keyboard_avoider/KeyboardAvoider/noSuchMethod.html">noSuchMethod</a></span><span class="signature">(<wbr><span class="parameter" id="noSuchMethod-param-invocation"><span class="type-annotation">Invocation</span> <span class="parameter-name">invocation</span></span>)
            <span class="returntype parameter">&#8594; dynamic</span>
          </span>
          </dt>
        <dd class="inherited">
          Invoked when a non-existent method or property is accessed. <a href="keyboard_avoider/KeyboardAvoider/noSuchMethod.html">[...]</a>
          <div class="features">inherited</div>
</dd>
        <dt id="toDiagnosticsNode" class="callable inherited">
          <span class="name"><a href="keyboard_avoider/KeyboardAvoider/toDiagnosticsNode.html">toDiagnosticsNode</a></span><span class="signature">(<wbr>{<span class="parameter" id="toDiagnosticsNode-param-name"><span class="type-annotation">String</span> <span class="parameter-name">name</span>, </span> <span class="parameter" id="toDiagnosticsNode-param-style"><span class="type-annotation">DiagnosticsTreeStyle</span> <span class="parameter-name">style</span></span> })
            <span class="returntype parameter">&#8594; DiagnosticsNode</span>
          </span>
          </dt>
        <dd class="inherited">
          Returns a debug representation of the object that is used by debugging
tools and by <a href="keyboard_avoider/KeyboardAvoider/toStringDeep.html">toStringDeep</a>. <a href="keyboard_avoider/KeyboardAvoider/toDiagnosticsNode.html">[...]</a>
          <div class="features">inherited</div>
</dd>
        <dt id="toString" class="callable inherited">
          <span class="name"><a href="keyboard_avoider/KeyboardAvoider/toString.html">toString</a></span><span class="signature">(<wbr>{<span class="parameter" id="toString-param-minLevel"><span class="type-annotation">DiagnosticLevel</span> <span class="parameter-name">minLevel</span>: <span class="default-value">DiagnosticLevel.debug</span></span> })
            <span class="returntype parameter">&#8594; String</span>
          </span>
          </dt>
        <dd class="inherited">
          Returns a string representation of this object.
          <div class="features">inherited</div>
</dd>
        <dt id="toStringDeep" class="callable inherited">
          <span class="name"><a href="keyboard_avoider/KeyboardAvoider/toStringDeep.html">toStringDeep</a></span><span class="signature">(<wbr>{<span class="parameter" id="toStringDeep-param-prefixLineOne"><span class="type-annotation">String</span> <span class="parameter-name">prefixLineOne</span>: <span class="default-value">''</span>, </span> <span class="parameter" id="toStringDeep-param-prefixOtherLines"><span class="type-annotation">String</span> <span class="parameter-name">prefixOtherLines</span>, </span> <span class="parameter" id="toStringDeep-param-minLevel"><span class="type-annotation">DiagnosticLevel</span> <span class="parameter-name">minLevel</span>: <span class="default-value">DiagnosticLevel.debug</span></span> })
            <span class="returntype parameter">&#8594; String</span>
          </span>
          </dt>
        <dd class="inherited">
          Returns a string representation of this node and its descendants. <a href="keyboard_avoider/KeyboardAvoider/toStringDeep.html">[...]</a>
          <div class="features">inherited</div>
</dd>
        <dt id="toStringShallow" class="callable inherited">
          <span class="name"><a href="keyboard_avoider/KeyboardAvoider/toStringShallow.html">toStringShallow</a></span><span class="signature">(<wbr>{<span class="parameter" id="toStringShallow-param-joiner"><span class="type-annotation">String</span> <span class="parameter-name">joiner</span>: <span class="default-value">', '</span>, </span> <span class="parameter" id="toStringShallow-param-minLevel"><span class="type-annotation">DiagnosticLevel</span> <span class="parameter-name">minLevel</span>: <span class="default-value">DiagnosticLevel.debug</span></span> })
            <span class="returntype parameter">&#8594; String</span>
          </span>
          </dt>
        <dd class="inherited">
          Returns a one-line detailed description of the object. <a href="keyboard_avoider/KeyboardAvoider/toStringShallow.html">[...]</a>
          <div class="features">inherited</div>
</dd>
        <dt id="toStringShort" class="callable inherited">
          <span class="name"><a href="keyboard_avoider/KeyboardAvoider/toStringShort.html">toStringShort</a></span><span class="signature">(<wbr>)
            <span class="returntype parameter">&#8594; String</span>
          </span>
          </dt>
        <dd class="inherited">
          A short, textual description of this widget.
          <div class="features">inherited</div>
</dd>
      </dl>
    </section>

    <section class="summary offset-anchor inherited" id="operators">
      <h2>Operators</h2>
      <dl class="callables">
        <dt id="operator ==" class="callable inherited">
          <span class="name"><a href="keyboard_avoider/KeyboardAvoider/operator_equals.html">operator ==</a></span><span class="signature">(<wbr><span class="parameter" id="==-param-other"><span class="type-annotation">dynamic</span> <span class="parameter-name">other</span></span>)
            <span class="returntype parameter">&#8594; bool</span>
          </span>
          </dt>
        <dd class="inherited">
          The equality operator. <a href="keyboard_avoider/KeyboardAvoider/operator_equals.html">[...]</a>
          <div class="features">inherited</div>
</dd>
      </dl>
    </section>




  </div> <!-- /.main-content -->

  <div class="col-xs-6 col-sm-6 col-md-2 sidebar sidebar-offcanvas-right">
    <ol>
      <li class="section-title"><a href="keyboard_avoider/KeyboardAvoider-class.html#constructors">Constructors</a></li>
      <li><a href="keyboard_avoider/KeyboardAvoider/KeyboardAvoider.html">KeyboardAvoider</a></li>
    
      <li class="section-title">
        <a href="keyboard_avoider/KeyboardAvoider-class.html#instance-properties">Properties</a>
      </li>
      <li><a href="keyboard_avoider/KeyboardAvoider/autoScroll.html">autoScroll</a></li>
      <li><a href="keyboard_avoider/KeyboardAvoider/child.html">child</a></li>
      <li><a href="keyboard_avoider/KeyboardAvoider/curve.html">curve</a></li>
      <li><a href="keyboard_avoider/KeyboardAvoider/duration.html">duration</a></li>
      <li><a href="keyboard_avoider/KeyboardAvoider/focusPadding.html">focusPadding</a></li>
      <li class="inherited"><a href="keyboard_avoider/KeyboardAvoider/hashCode.html">hashCode</a></li>
      <li class="inherited"><a href="keyboard_avoider/KeyboardAvoider/key.html">key</a></li>
      <li class="inherited"><a href="keyboard_avoider/KeyboardAvoider/runtimeType.html">runtimeType</a></li>
    
      <li class="section-title"><a href="keyboard_avoider/KeyboardAvoider-class.html#instance-methods">Methods</a></li>
      <li><a href="keyboard_avoider/KeyboardAvoider/createState.html">createState</a></li>
      <li class="inherited"><a href="keyboard_avoider/KeyboardAvoider/createElement.html">createElement</a></li>
      <li class="inherited"><a href="keyboard_avoider/KeyboardAvoider/debugDescribeChildren.html">debugDescribeChildren</a></li>
      <li class="inherited"><a href="keyboard_avoider/KeyboardAvoider/debugFillProperties.html">debugFillProperties</a></li>
      <li class="inherited"><a href="keyboard_avoider/KeyboardAvoider/noSuchMethod.html">noSuchMethod</a></li>
      <li class="inherited"><a href="keyboard_avoider/KeyboardAvoider/toDiagnosticsNode.html">toDiagnosticsNode</a></li>
      <li class="inherited"><a href="keyboard_avoider/KeyboardAvoider/toString.html">toString</a></li>
      <li class="inherited"><a href="keyboard_avoider/KeyboardAvoider/toStringDeep.html">toStringDeep</a></li>
      <li class="inherited"><a href="keyboard_avoider/KeyboardAvoider/toStringShallow.html">toStringShallow</a></li>
      <li class="inherited"><a href="keyboard_avoider/KeyboardAvoider/toStringShort.html">toStringShort</a></li>
    
      <li class="section-title inherited"><a href="keyboard_avoider/KeyboardAvoider-class.html#operators">Operators</a></li>
      <li class="inherited"><a href="keyboard_avoider/KeyboardAvoider/operator_equals.html">operator ==</a></li>
    
    
    
    </ol>
  </div><!--/.sidebar-offcanvas-->

</main>

<footer>
  <span class="no-break">
    keyboard_avoider 0.0.1
  </span>

</footer>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="static-assets/typeahead.bundle.min.js"></script>
<script src="static-assets/highlight.pack.js"></script>
<script src="static-assets/URI.js"></script>
<script src="static-assets/script.js"></script>


</body>

</html>
